package com.face.server.config;

import com.face.RespMsg;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ErrorResolver {

    @ExceptionHandler
    public RespMsg errorCatch(Exception ex) {
        ex.printStackTrace();
        return RespMsg.error(-1, ex.getMessage());
    }


}
